libxenlight: fix memory leaks
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 23 Nov 2009 07:04:54 +0000 (07:04 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 23 Nov 2009 07:04:54 +0000 (07:04 +0000)
commitcbc97d570c09ff9a1db5af18f5e5db5565ab3506
treeb32af8d3a725fcbb3424256be86529e8aa770667
parente0df60ddc150199256cb6b9fd3f5573ba2fe5a0d
libxenlight: fix memory leaks

In particular:

- all the temporary flexarrays allocated in the create
  device functions must be freed;

- all the strings that don't need to be modified can be added as they
  are
  to these temporary flexarrays instead of duplicating them;

- any data returned to the user shouldn't be added to the global
  memory tracker so that the user can free it whenever he wishes.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
tools/libxl/libxl.c
tools/libxl/libxl.h
tools/libxl/libxl_device.c
tools/libxl/libxl_dom.c
tools/libxl/libxl_internal.h
tools/libxl/libxl_utils.c
tools/libxl/xl.c